<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>AdminLTE | UserPro</title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <!--<meta http-equiv="refresh" content="5">-->

    <!-- font Awesome -->
    <link href="../static/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
    <!-- Theme style -->
    <link href="../static/css/AdminLTE.css" rel="stylesheet" type="text/css"/>
    <link href="../static/css/glmapp.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" type="text/css" href="../static/css/right/common.css"/>
    <link rel="stylesheet" type="text/css" href="../static/css/right/slide.css"/>
    <link rel="stylesheet" type="text/css" href="../static/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="../static/css/right/flat-ui.min.css"/>
    <link rel="stylesheet" type="text/css" href="../static/css/right/jquery.nouislider.css"/>
    <style>
        span1{
            color: red;
        }
    </style>
</head>
<body class="skin-blue">
<!-- header logo: style can be found in header.less -->
<header class="header">
    <a href="index.html" class="logo">
        <!-- Add the class icon to your logo image or logo icon to add the margining -->
        AdminLTE
    </a>
    <!-- Header Navbar: style can be found in header.less -->
    <nav class="navbar navbar-static-top" role="navigation">
        <!-- Sidebar toggle button-->
        <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </a>
        <div class="navbar-right">
            <ul class="nav navbar-nav">
                <!-- User Account: style can be found in dropdown.less -->
                <li class="dropdown user user-menu">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <i class="glyphicon glyphicon-user"></i>
                        <span>个人中心<i class="caret"></i></span>
                    </a>
                    <ul class="dropdown-menu">
                        <!-- User image -->
                        <li class="user-header bg-light-blue">
                            <img src="../static/img/pers/rw1.png" class="img-circle" alt="User Image"/>
                            <p>
                                我
                            </p>
                        </li>
                        <!-- Menu Body -->
                        <li class="user-body">
                            <div class="col-xs-4 text-center">
                                <a href="/findManger">个人信息</a>
                            </div>
                            <div class="col-xs-4 text-center">
                                <a href="/findAllLogs">操作日志</a>
                            </div>
                            <div class="col-xs-4 text-center">
                                <a href="/login">退出登录</a>
                            </div>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </nav>
</header>
<div class="wrapper row-offcanvas row-offcanvas-left">
    <!-- Left side column. contains the logo and sidebar -->
    <aside class="left-side sidebar-offcanvas">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
            <!-- Sidebar user panel -->
            <div class="user-panel">
                <div class="pull-left image">
                    <img src="../static/img/pers/rw1.png" class="img-circle" alt="User Image"/>
                </div>
                <div class="pull-left info">
                    <p>你好，管理员</p>

                    <a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
                </div>
            </div>
            <!-- search form -->
            <form action="#" method="get" class="sidebar-form">
                <div class="input-group">
                    <input type="text" name="search" class="form-control" placeholder="搜索..."/>
                    <span class="input-group-btn">
                                <button type='submit' name='searchtoUrl' id='search-btn' class="btn btn-flat"><i
                                        class="fa fa-search"></i></button>
                            </span>
                </div>
            </form>
            <!-- /.search form -->
            <!-- sidebar menu: : style can be found in sidebar.less -->
            <ul class="sidebar-menu">
                <li>
                    <a href="index.html">
                        <i class="fa fa-dashboard"></i> <span>首页</span>
                    </a>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-bar-chart-o"></i>
                        <span>日志管理</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="/LogCatchPre"><i class="fa fa-angle-double-right"></i> 日志获取</a></li>
                        <li><a href="LogAnalysis.html"><i class="fa fa-angle-double-right"></i> 日志分析</a></li>
                        <li><a href="LogWarn.html"><i class="fa fa-angle-double-right"></i> 日志报警</a></li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-table"></i> <span>系统管理</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="/SysRightPre"><i class="fa fa-angle-double-right"></i> 权限管理</a></li>
                        <li><a href="/PersRightPre"><i class="fa fa-angle-double-right"></i> 人员管理</a></li>
                    </ul>
                </li>
                <li>
                    <a href="calendar.html">
                        <i class="fa fa-calendar"></i> <span>日历</span>

                    </a>
                </li>
                <li>
                    <a href="/findAllMailsInBox">
                        <i class="fa fa-envelope"></i> <span>邮箱</span>

                    </a>
                </li>
            </ul>
        </section>
        <!-- /.sidebar -->
    </aside>
    <!-- Right side column. Contains the navbar and content of the page -->
    <aside class="right-side">
        <!-- Main content -->
        <div class="content">
            <div class="gaea-view ng-scope">
                <div class="gaea-navbar ng-scope" ui-view="navbar">
                    <div class="navbar-resource ng-scope">
                        <div class="resource-navbar">
                            <div class="resource-nav-header">
                                <img class="resource-icon"
                                     ng-src="https://qiniu.staticfile.org/static/images/sidebar/account.03e5632b.svg"
                                     alt
                                     src="../static/img/account.03e5632b.svg">
                                <strong>个人中心</strong>
                                <span>
                                <strong>></strong>
                            </span>
                                <span class="ng-binding">个人信息</span>
                            </div>
                            <div class="resource-menu">
                                <ul class="resource-breadcrumb clearfix1">
                                    <li iam-disabled class="basic-operation" style="display: list-item;">
                                        <a ui-sref="gaea.user.oplog" ui-sref-active="actived" class="ng-binding actived"
                                           onclick="function getManager() {
                                        $.ajax(
                                            {
                                            type:'get',
                                            url:'/findManager',
                                            dataType:'json',

                                            }

                                        )
                                    }
                                    getManager()">个人信息</a>
                                    </li>
                                    <li class="basic-operation">
                                        <a ui-sref="gaea.user.oplog" ui-sref-active="actived" class="ng-binding "
                                           href="/findAllLogs">操作日志</a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div id="author-edit-page" class="author-edit-page">
                <h2> 基本资料</h2>
                <hr/>
                <ul class="author-edit-list">
                    <li>
                        <div class="edit-name">id</div>
                        <div class="edit-item">
                            <div class="edit-value">
                                <span th:text="${manager.id}">M1</span>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="edit-name">管理员类型</div>
                        <div class="edit-item">
                            <div class="edit-value">
                                <span th:text="${manager.managerType}">Manager</span>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="edit-name">姓名</div>
                        <div class="edit-item">
                            <div class="edit-value">
                                <span th:text="${manager.name}">zzz</span>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="edit-name">性别</div>
                        <div class="edit-item">
                            <div class="edit-value">
                                <span th:text="${manager.sex}">女</span>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="edit-name">年龄</div>
                        <div class="edit-item">
                            <div class="edit-value">
                                <span th:text="${manager.age}">34</span>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="edit-name">地址</div>
                        <div class="edit-item">
                            <div class="edit-value">
                                <span th:text="${manager.location}">安徽省淮南第一中学</span>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="edit-name">密码</div>
                        <div class="edit-item">
                            <div class="edit-value">
                                <span th:text="${manager.password}">qlsdasdz</span>
                            </div>
                        </div>
                        <button class="btn btn-success btn-xs" data-toggle="modal"
                                data-target="#updatePassword"
                                th:onclick="updatePassword([[${manager.id}]])">修改密码
                        </button>
                    </li>
                    <li>
                        <div class="edit-name">邮箱</div>
                        <div class="edit-item">
                            <div class="edit-valuevalue">
                                <span th:text="${manager.email}">3067444789@qq.com</span>
                            </div>
                        </div>
                    </li>
                    <!--<li class="b2-radius">
                        <div class="edit-name">头像选择</div>
                        <img src="<%=manager.imgurl%>">
                    </li>-->
                </ul>
            </div>
        </div><!-- /.content -->
    </aside><!-- /.right-side -->
</div><!-- ./wrapper -->

<!--弹出修改用户窗口-->
<div class="modal fade" id="updatePassword" role="dialog" aria-labelledby="gridSystemModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="gridSystemModalLabel2">修改密码</h4>

            </div>
            <div class="modal-body">
                <div class="container-fluid">
                    <form class="form-horizontal" action="#" id="updateform" method="get" onsubmit="getUrl()">
                        <input type="hidden" id="mid" name="mid" value=""/>
                        <div class="form-group ">
                            <label class="col-xs-3 control-label">输入新密码：</label>
                            <div class="col-xs-8 ">
                                <input type="password" class="form-control input-sm duiqi" id="Mpass" name="Mpass"
                                       value="" placeholder="密码必须是8-19位英文和数字的组合" required="required"
                                       onblur="checkPass()"/>
                                <span1 id="errorPass"></span1>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">确认新密码：</label>
                            <div class="col-xs-8">
                                <input type="password" class="form-control input-sm duiqi" id="Mpass1" name="Mpass1"
                                       value="" placeholder="确认新密码" required="required"
                                       onblur="checkRPass1()"/>
                                <span1 id="errorRPass"></span1>
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-xs btn-white" data-dismiss="modal">取 消</button>
                            <button type="submit" class="btn btn-xs btn-green">确 定</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- jQuery 2.0.2 -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<!-- jQuery UI 1.10.3 -->
<script src="../static/js/jquery-ui-1.10.3.min.js" type="text/javascript"></script>
<!-- Bootstrap -->
<script src="../static/js/bootstrap.min.js" type="text/javascript"></script>
<!-- AdminLTE App -->
<script src="../static/js/AdminLTE/app.js" type="text/javascript"></script>
<!-- Page specific script -->
<script src="../static/js/right/jquery.nouislider.js"></script>
<script type="text/javascript">
    function updatePassword(ID) {
        $("#mid").val(ID);
    }
</script>
<script type="text/javascript">
    function checkPass() {
        var Mpass = $.trim($("#Mpass").val());
        var reg_password = /(^[a-zA-Z0-9_-]{8,19}$)/;
        if(Mpass==''){
            $("#errorPass").html("请输入密码！");
            return false;
        }else{
            if(!reg_password.test(Mpass)){
                $("#errorPass").html("输入的密码必须是8-19位英文和数字的组合！");
                return false;
            }else{
                $("#errorPass").html("验证通过");
            }
        }
        return true;
    }
</script>
<script type="text/javascript">
    function checkRPass1() {
        var Mpass = $.trim($("#Mpass").val());
        var MRpass = $.trim($("#Mpass1").val());
        $("#errorRPass").html("");
        if(Mpass==''){
            $("#errorRPass").html("请先输入原密码！");
            return false;
        }else{
            if(MRpass==''){
                $("#errorRPass").html("请再次输入密码！");
                return false;
            }else{
                if(Mpass==MRpass&&Mpass!=''&&MRpass!=''){
                    $("#errorRPass").html("验证通过！");
                }else{
                    $("#errorRPass").html("再次输入的密码与原密码不一致！");
                    return false;
                }
            }
        }

        return true;
    }
</script>
<script type="text/javascript">
    function getUrl() {
        const myurl = '/updatePassword?id=' + $("#mid").val();
        $("#updateform").attr("action", myurl);
    }
</script>
</body>

</html>